﻿namespace CNav.Repository.UoV
{
    public interface IRepositoryFactory
    {
        IRepository<T> Get<T>() where T : class;
    }

    public class RepositoryFactory : IRepositoryFactory
    {
        private readonly IDbContext _context;

        public RepositoryFactory(IDbContext context)
        {
            _context = context;
        }

        public IRepository<T> Get<T>() where T : class
        {
            return new Repository<T>(_context);
        }
    }
}
